package com.app.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
 * 报灾信息
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("lm_disaster_reporting")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DisasterReportingModel {
    @TableId(type = IdType.AUTO)
    private Integer id; //管理员用户表
    private Integer allocationStatus;//分配状态 1 待分配  2已分配  3已办结
    private Integer handleStatus;//处理状态 1 待处理  2已处理
    private String realName;//处理单位
    private String type;//报灾类型
    private String position;//位置
    private Double latitude;//经度
    private Double longitude;//经度
    private String specificPosition;//具体位置
    private String disasterSituation;//灾害情况
    private String fileId;//文件id
    private Integer claimsSettlementStatus; //理赔状态1已理赔2未理赔
    private String areaId;//地区id
    private String areaName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") //后端注解格式化日期
    private String occurTime;//发生时间
    private Integer isAnonymous;//是否匿名
    private String openId;//微信用户
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;

    @TableField(exist = false)
    private String statusText;//状态文字显示

    @TableField(exist = false)
    private String typeText;//报灾类型文字
    @TableField(exist = false)
    private String username;//用户名字
    @TableField(exist = false)
    private String phone;//用户手机号
    @TableField(exist = false)
    private List<AreaModel> area;
    @TableField(exist = false)
    private DisasterHandleModel disasterHandle; //处理详情

    @TableField(exist = false)
    private ClaimsSettlementModel claimsSettlementModel; //理赔详情

    @TableField(exist = false)
    private List<UnitsManagerModel> unitsManagerModels; //分配单位

    @TableField(exist = false)
    private List<String> url;
    @TableField(exist = false)
    private List<String> videoUrl;

    @TableField(exist = false)
    private String[] video;//视频
    @TableField(exist = false)
    private String[] pic;//图片
}
